{include file="admin/header.tpl" title="header" }

<div id="content"> {php} echo display_msg(); {/php}
  <div class="error" id="main_error_div" style="display:none;"></div>
  
  {if !isset($post.category_id) }
  <h2>Add Category</h2>
  <div class="lstable2">
    <form method="post" >
      <input type="hidden" name="action" id="action" value="add">
      <table width="100%" border="0" cellspacing="0" cellpadding="4">
        <tr>
          <td width="15%" align="left" valign="middle"><strong>Category Name : <span class="mandatory">*</span></strong></td>
          <td width="70%" align="left" valign="middle"><input maxlength="255" type="text" name="category_name" value="{$post.category_name|stripslashes}" /></td>
          <td width="15%">&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td  colspan="2" align="left"><input name="submit" class="btncss" type="submit" value="Save" />
            &nbsp;
            <input class="btncss" type="button" onclick="location.href='{$baseurl}/admin/category.php'" value="Cancel" /></td>
        </tr>
      </table>
    </form>
  </div>
  {else}
   <h2>Edit Category</h2>
  <div class="lstable2">
    <form method="post" >
      <input type="hidden" name="action" id="action" value="edit">
      <input type="hidden" name="category_id" value="{$post.category_id}">
      <table width="100%" border="0" cellspacing="0" cellpadding="4">
        <tr>
          <td width="15%" align="left" valign="middle"><strong>Category Name : <span class="mandatory">*</span></strong></td>
          <td width="70%" align="left" valign="middle"><input maxlength="255" type="text" name="category_name" value="{$post.category_name|stripslashes}" /></td>
          <td width="15%">&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td  colspan="2" align="left"><input name="submit" class="btncss" type="submit" value="Save" />
            &nbsp;
            <input class="btncss" type="button" onclick="location.href='{$baseurl}/admin/category.php'" value="Cancel" /></td>
        </tr>
      </table>
    </form>
  </div>
  
  {if $post.tournament_schedule_id > 0}
          <script language="javascript">
              getMatchDetailByTournamentId({$post.tournament_id} , {$post.tournament_match_type_id});
              getScheduleListByMatchTypeId({$post.tournament_match_type_id} , {$post.tournament_schedule_id});
           </script>
       {/if}
  
  {/if} 
  </div>
{include file="admin/footer.tpl" title="footer"} 